import entity, entitymgr
import transformcomponent
import spritecomponent
import attrcomponent

class EntityBuilder:
    def BuildPlayer(self):
        e = entitymgr.EntityMgr().New()

        transform = transformcomponent.TransformComponent()
        transform.SetPosition((0, 300))
        e.AddComponent("transform", transform)

        attr = attrcomponent.AttrsComponent()
        e.AddComponent("attr", attr)

        sprite = spritecomponent.SpriteComponent()
        sprite.LoadImage("./Resource/player_walk.png", 96, 96, 8, 8)
        sprite.SetPosition(transform.GetPosition())
        e.AddComponent("sprite", sprite)
        return e


